package com.nmsl.statistic.service.impl;

import java.util.List;
import com.nmsl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.nmsl.statistic.mapper.DailyFlowMapper;
import com.nmsl.statistic.domain.DailyFlow;
import com.nmsl.statistic.service.IDailyFlowService;

/**
 * 每日流水Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-24
 */
@Service
public class DailyFlowServiceImpl implements IDailyFlowService 
{
    @Autowired
    private DailyFlowMapper dailyFlowMapper;

    /**
     * 查询每日流水
     * 
     * @param dailyFlowId 每日流水主键
     * @return 每日流水
     */
    @Override
    public DailyFlow selectDailyFlowByDailyFlowId(String dailyFlowId)
    {
        return dailyFlowMapper.selectDailyFlowByDailyFlowId(dailyFlowId);
    }

    /**
     * 查询每日流水列表
     * 
     * @param dailyFlow 每日流水
     * @return 每日流水
     */
    @Override
    public List<DailyFlow> selectDailyFlowList(DailyFlow dailyFlow)
    {
        return dailyFlowMapper.selectDailyFlowList(dailyFlow);
    }

    /**
     * 新增每日流水
     * 
     * @param dailyFlow 每日流水
     * @return 结果
     */
    @Override
    public int insertDailyFlow(DailyFlow dailyFlow)
    {
        dailyFlow.setCreateTime(DateUtils.getNowDate());
        return dailyFlowMapper.insertDailyFlow(dailyFlow);
    }

    /**
     * 修改每日流水
     * 
     * @param dailyFlow 每日流水
     * @return 结果
     */
    @Override
    public int updateDailyFlow(DailyFlow dailyFlow)
    {
        return dailyFlowMapper.updateDailyFlow(dailyFlow);
    }

    /**
     * 批量删除每日流水
     * 
     * @param dailyFlowIds 需要删除的每日流水主键
     * @return 结果
     */
    @Override
    public int deleteDailyFlowByDailyFlowIds(String[] dailyFlowIds)
    {
        return dailyFlowMapper.deleteDailyFlowByDailyFlowIds(dailyFlowIds);
    }

    /**
     * 删除每日流水信息
     * 
     * @param dailyFlowId 每日流水主键
     * @return 结果
     */
    @Override
    public int deleteDailyFlowByDailyFlowId(String dailyFlowId)
    {
        return dailyFlowMapper.deleteDailyFlowByDailyFlowId(dailyFlowId);
    }
}
